package com.example._9_springmvc.xzy.service.impl;

import com.example._9_springmvc.xzy.dao.UserDao;
import com.example._9_springmvc.xzy.dao.impl.UserDaoImpl;
import com.example._9_springmvc.xzy.service.UserService;
import org.springframework.stereotype.Service;

import java.sql.SQLException;

@Service
public class UserServiceImpl implements UserService {
    private UserDaoImpl userDaoImpl;

    public void setUserDao(UserDaoImpl userDaoImpl) {
        this.userDaoImpl = userDaoImpl;
    }

    public String UserLogin(String name, String pwd) throws SQLException, ClassNotFoundException {
        String tmp = userDaoImpl.UserLogin(name, pwd);
//        System.out.println("login result: " + tmp);
        return tmp;
    }
}
